import {customeStruct} from '../utils';
const itf = customeStruct.interface;
const content = {
    id: 'string',
    code: 'string? | null',
    name: 'string? | null',
    programName: 'string? | null',
    important: 'number? | null',
    noticeTime: 'string? | null',
    noticerName: 'string? | null',
    status: 'number? | null',
    rowVersion: 'string',
    options: ['string'],
};

export const InitDataStruct = itf({
    payload: itf({
        programs: [itf(Object.assign({
            id: 'string',
            code: 'string',
            name: 'string',
        }))],
        isDealerUser: 'boolean',
    })
});

export const List = itf({
    payload: itf({
        content: [itf(Object.assign(content))]
    })
});

export const Detail = itf({
    payload: itf({
        id: 'string',
        rowVersion: 'string',
        options: ['string']
    })
});

export const NoticeProgramList = itf({
    payload: itf({
        content: [itf(Object.assign({
            id: 'string',
            rowVersion: 'string',
            options: ['string'],
        }))]
    })
});

export const NoticeProgramDetail = itf({
    payload: itf({
        id: 'string',
        rowVersion: 'string',
        options: ['string']
    })
});

